package com.chenzehe.alimama.common;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import org.springframework.beans.factory.InitializingBean;

import com.chenzehe.java.core.SpringContextHolder;

public class Config implements InitializingBean {

	static Config config;

	private String webRoot; // Web项目部署根路径

	@Override
	public void afterPropertiesSet() throws Exception {
		config = (Config) SpringContextHolder.getBean("baseConfig");
	}

	/**
	 * 日期格式化对象
	 */
	public static final DateFormat MONTH_FORMAT = new SimpleDateFormat(
			"/yyyy/MM");

	public static String getWebRoot() {
		return config.webRoot;
	}

	public void setWebRoot(String webRoot) {
		this.webRoot = webRoot;
	}

}
